package com.module.admin.Warpper;


import com.module.common.BaseControllerWarpper;
import com.module.common.factory.ConstantFactory;
import com.module.listen.OnlineSession;
import com.module.listen.SessionListener;
import com.module.utils.SessionUtil;

import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class UserWarpper extends BaseControllerWarpper {
    public UserWarpper(List<Map<String, Object>> list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
        if(map.get("user_gender")!=null&&map.get("user_gender")!=""){
            map.put("sex", ConstantFactory.me().getSex(Integer.parseInt((String) map.get("user_gender"))));
        }
        Boolean isonline=SessionUtil.checkedOnline(map.get("user_name"));
        if(isonline){
            map.put("statusName", "在线");
        }else {
            map.put("statusName", "离线");
        }

    }
}
